﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using WeiboSdk;
using System.Windows.Navigation;
using WeiboSdk.PageViews;
using USpell.API;

namespace USpell.Views
{
    public partial class PanoramaPage : PhoneApplicationPage
    {
        ViewModels.VMGuessFrom vm_GuessFrom;
        ViewModels.VMGuessTo vm_GuessTo;

        public PanoramaPage()
        {
            InitializeComponent();

            vm_GuessFrom = new ViewModels.VMGuessFrom();
            vm_GuessTo = new ViewModels.VMGuessTo();
            this.lb_GuessFrom.DataContext = vm_GuessFrom;
            this.lb_GuessTo.DataContext = vm_GuessTo;
            this.Loaded += PanoramaPage_Loaded;
        }

        void PanoramaPage_Loaded(object sender, RoutedEventArgs e)
        {
            vm_GuessFrom.GetAllGuessFrom();
            vm_GuessTo.GetAllGuessTo();
        }



        private void bar_CreateGuess_Click(object sender, EventArgs e)
        {

        }

        private void bar_Login_Click(object sender, EventArgs e)
        {
            if (!Core.BindingSinaFriend())
                NavigationService.Navigate(new Uri("/WeiboSdk;component/PageViews/AuthenticationView.xaml", UriKind.Relative));
        }

    }
}